package com.zy.teacherSecretarySide.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.teacherSecretarySide.entity.TeacherSecretary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * @author CR
 */
@Mapper
@Component
public interface TeacherSecretaryDao extends BaseMapper<TeacherSecretary> {

    /**
     * 根据教师秘书的编号和密码进行查询
     * @param secretaryNum
     * @param secretaryPassword
     * @return TeacherSecretary
     */
    @Select("select * from hms_teacher_secretary where secretary_num=#{secretaryNum} and secretary_password=#{secretaryPassword}")
    TeacherSecretary teacherSecretaryLogin(Integer secretaryNum,String secretaryPassword);

    /**
     * 根据教师秘书的编号查重
     * @param secretaryNum
     * @return
     */
    @Select("select * from hms_teacher_secretary where secretary_num=#{secretaryNum}")
    TeacherSecretary getSecretaryById(Integer secretaryNum);
}
